package com.ztjy.repository.controller;

import com.github.pagehelper.PageInfo;
import com.ztjy.bean.Allkc;
import com.ztjy.bean.CProduct;
import com.ztjy.bean.KcWarehouse;
import com.ztjy.repository.biz.AllkcBiz;
import com.ztjy.repository.biz.KcWarehouseBiz;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Controller;
import org.springframework.ui.Model;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestParam;

@Controller
@RequestMapping("/rep/kcware")
public class KcWarehouseController {
    @Autowired
    private AllkcBiz abiz;

    @RequestMapping("/allkc")
    public String findAllKcWare(Model model, Allkc allkc, @RequestParam(defaultValue = "1", value = "pageno") Integer pageNo){
        Integer pageSize=6;
        PageInfo<Allkc> allPage = abiz.findAllPage(allkc, pageNo, pageSize);
        model.addAttribute("allkc",allkc);
        model.addAttribute("allkuinfo",allPage);
        return "forward:/storage/inventory/inventoryList.html";
    }
}
